Cherry-pick: Fix autoentity bugs & upgrade library package#3495
Open
RubenCerna2079 wants to merge 3 commits intorelease/2.0from
Open
Cherry-pick: Fix autoentity bugs & upgrade library package#3495RubenCerna2079 wants to merge 3 commits intorelease/2.0from
RubenCerna2079 wants to merge 3 commits intorelease/2.0from
Conversation
## Why make this change? - Fixes bug issue #3458 ## What is this change? This changes how the in-memory entities are created from the `autoentities` property by specifying the schema as well as the object they come from in the `MsSqlMetadataProvider`, in order for DAB to not default to the `dbo` schema and cause a failure. ## How was this tested? - [x] Integration Tests - [ ] Unit Tests Added tests that ensure entities that are in the non-default schema `dbo` are also created without any issues and can be used by the REST and GraphQL endpoints. ## Sample Request(s) ``` "entities": {}, "autoentities": { "default": { "patterns": { "include": [ "foo.%", "bar.%" ], "name": "{schema}_{object}" }, "template": { "mcp": { "dml-tools": true }, "rest": { "enabled": true }, "graphql": { "enabled": true }, "health": { "enabled": true }, "cache": { "enabled": false } }, "permissions": [ { "role": "anonymous", "actions": [ "create", "read", "update", "delete" ] } ] } ``` <img width="1199" height="587" alt="image" src="https://github.com/user-attachments/assets/972a2314-f84e-471b-a32d-fda1ddff61ad" /> --------- Co-authored-by: Souvik Ghosh <souvikofficial04@gmail.com>
## Why make this change? - Fixes issue #3455 ## What is this change? This changes the default value of the `patterns.name` property inside `autoentities` so that it uses both the {schema} and {object} in order to allow users to use multiple objects that have the same name but are from different schemas without the need to do additional changes to the config file. This PR is dependent on PR #3468. ## How was this tested? - [X] Integration Tests - [ ] Unit Tests - [X] Manual Tests Used sample below to ensure that different entities with the same object name but different schema name can be created without the need to change the `patterns.name` property. ## Sample Request(s) ``` "AllMagazineObjects": { "patterns": { "include": [ "%.magazines" ] }, "permissions": [ { "role": "anonymous", "actions": [ { "action": "*" } ] } ] } ``` <img width="1060" height="499" alt="image" src="https://github.com/user-attachments/assets/8a8f01ae-a10c-49ba-a3fe-4881c8a2aacd" /> <img width="1075" height="649" alt="image" src="https://github.com/user-attachments/assets/6754b26e-fe24-4f26-adaa-c41c5ee6955f" /> --------- Co-authored-by: Souvik Ghosh <souvikofficial04@gmail.com>
….15.3 (#3488) ## Why make this change? Bump `OpenTelemetry.Exporter.OpenTelemetryProtocol` to pick up patch fixes from 1.15.3. ## What is this change? - Updated `OpenTelemetry.Exporter.OpenTelemetryProtocol` from `1.13.0` → `1.15.3` in `src/Directory.Packages.props` (centrally managed versions) ## How was this tested? - [ ] Integration Tests - [ ] Unit Tests ## Sample Request(s) N/A — dependency version bump only. > [!WARNING] > > <details> > <summary>Firewall rules blocked me from connecting to one or more addresses (expand for details)</summary> > > #### I tried to connect to the following addresses, but was blocked by firewall rules: > > - `www.nuget.org` > - Triggering command: `/home/REDACTED/work/_temp/ghcca-node/node/bin/node /home/REDACTED/work/_temp/ghcca-node/node/bin/node --enable-source-maps /home/REDACTED/work/_temp/copilot-developer-action-main/dist/index.js` (dns block) > > If you need me to access, download, or install something from one of these locations, you can either: > > - Configure [Actions setup steps](https://gh.io/copilot/actions-setup-steps) to set up my environment, which run before the firewall is enabled > - Add the appropriate URLs or hosts to the custom allowlist in this repository's [Copilot coding agent settings](https://github.com/Azure/data-api-builder/settings/copilot/coding_agent) (admins only) > > </details> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: RubenCerna2079 <32799214+RubenCerna2079@users.noreply.github.com> Co-authored-by: Ruben Cerna <rcernaserna@microsoft.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Cherry-picks fixes around MSSQL autoentity generation (especially schema-qualified naming to avoid collisions) and updates the OpenTelemetry OTLP exporter version.
Changes:
- Change default autoentity name interpolation to
{schema}_{object}and update CLI/schema docs accordingly. - Qualify MSSQL generated entity source objects with
{schema}.{object}. - Expand/update MSSQL autoentity tests to cover schema collision scenarios and new default naming.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Service.Tests/Configuration/ConfigurationTests.cs | Updates existing autoentity tests for new naming and adds new coverage for same-object/different-schema scenarios. |
| src/Directory.Packages.props | Upgrades OpenTelemetry OTLP exporter package version. |
| src/Core/Services/MetadataProviders/MsSqlMetadataProvider.cs | Updates generated entity source object to include schema qualification. |
| src/Config/ObjectModel/AutoentityPatterns.cs | Changes default autoentity name interpolation pattern to include schema prefix. |
| src/Cli/Commands/AutoConfigOptions.cs | Updates CLI help text to reflect new default pattern. |
| schemas/dab.draft.schema.json | Updates JSON schema default/description for autoentity naming pattern. |
souvikghosh04
approved these changes
May 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why make this change?
This change cherry-picks the PRs that fix the Autoentity bugs and upgrade the
OpenTelemetryProtocollibrary for DAB 2.0.What is this change?
Cherry-picked PRs:
patterns.namedefault value #3472How was this tested?
Existing tests in cherry-pick cover new changes.
Sample Request(s)
N/A